<template>
  <div>
    <div class="indexModelTitle">
      <div class="indexClassTitle">学历班型</div>
    </div>
    <ul class="indexClassListOn">
      <li class="indexClassList" v-for="item of recordList" :key="item.id">
        <div class="indexClassImg">
          <img class="indexClassImgs" :src="item.largePicture">
        </div>
        <div class="indexClassTit">
          {{item.title}}
          <div class="indexClassNum">
            <span class="indexClassNumSpan">课程{{item.courseNum}}节</span>
            <div class="indexClassPag">
              {{item.price}}
              <span>{{item.studentNum}}人在学习</span>
            </div>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import { fetchIndexRecordList } from '@/api/index'
export default {
  name: 'IndexRecordList',
  data () {
    return {
      recordList: []
    }
  },
  mounted () {
    this.getRecordList()
  },
  methods: {
    getRecordList () {
      const data = {
        t: 'zaMDWXp6G',
        r: '1566541387',
        z: '932C972DEF582EFF5D704B0F3DBF2BB5',
        type: 2
      }
      fetchIndexRecordList(data).then(res => {
        this.recordList = res.data[0]
      })
    }
  }
}
</script>
